<template>
  <view style="overflow-y: auto; min-height: 100vh;">
    <view>
      demo02
    </view>
    <scroll-view @scroll="scrollFn" scroll-y="true" style="height: 200rpx;">
      <view v-for="i in 200" :key="i">
        {{i}}
      </view>
    </scroll-view>
    <view v-for="i in 200" :key="i">
      {{i}}
    </view>
  </view>
</template>

<script setup>
  import {
    onLoad,
    onPageScroll
  } from "@dcloudio/uni-app";

  onLoad((e) => {
    console.log(e)
  })

  onPageScroll((e) => {
    console.log(e.scrollTop)
  })

  const scrollFn = (e) => {
    console.log(e.target.scrollTop)
  }
</script>

<style>

</style>
